import 'package:flutter_test/flutter_test.dart';
import 'package:sqflite_helper/sqflite_helper.dart';
import 'package:sqflite_helper/sqflite_helper_platform_interface.dart';
import 'package:sqflite_helper/sqflite_helper_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockSqfliteHelperPlatform
    with MockPlatformInterfaceMixin
    implements SqfliteHelperPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final SqfliteHelperPlatform initialPlatform = SqfliteHelperPlatform.instance;

  test('$MethodChannelSqfliteHelper is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelSqfliteHelper>());
  });

  test('getPlatformVersion', () async {
    SqfliteHelper sqfliteHelperPlugin = SqfliteHelper();
    MockSqfliteHelperPlatform fakePlatform = MockSqfliteHelperPlatform();
    SqfliteHelperPlatform.instance = fakePlatform;

    expect(await sqfliteHelperPlugin.getPlatformVersion(), '42');
  });
}
